<?php

use think\facade\Route;

//首页
Route::get('/', 'index/index')->middleware('verify');

//上传
Route::group('uploads', function () {
    Route::rule('/uploadImage', 'uploads/uploadImage');
    Route::rule('/uploadImageMaterial', 'uploads/uploadImageMaterial');
    Route::rule('/uploadEditorVideo', 'uploads/uploadEditorVideo');
    Route::rule('/uploadVideo', 'uploads/uploadVideo');
})->ext('html');

Route::group('index', function () {
    Route::get('/index', 'index/index');
    Route::get('/welcome', 'index/welcome');
    Route::get('/clear_cache', 'index/clear_cache');
})->middleware('verify')->ext('html');

//登录
Route::group('login', function () {
    Route::get('/index', 'login/index');
    Route::post('/check', 'login/check');
    Route::post('/logout', 'login/logout');
})->ext('html');

//我的桌面
Route::group('desktop', function () {
    Route::get('/index', 'desktop/statistics');
})->middleware('verify')->ext('html');

Route::group('test', function () {
    Route::get('/index', 'test/index');
    Route::get('/getList', 'test/getList');
})->middleware('verify')->ext('html');

//会员管理
Route::group('user', function () {
    Route::get('/ordinary', 'user/ordinary');
    Route::get('/formal', 'user/formal');
    Route::get('/add', 'user/add');
    Route::get('/edit', 'user/edit');
    Route::post('/reset', 'user/reset');
    Route::post('/save', 'user/save');
    Route::post('/login', 'user/login');
    Route::rule('/recharge', 'user/recharge','POST|GET');
    Route::get('/export', 'user/export');
    Route::get('/getList', 'user/getList');
    Route::get('/getLevel', 'user/getLevel');
    Route::get('/login', 'user/login');
    Route::post('/update', 'user/update');
    Route::post('/delete', 'user/delete');
    Route::post('/activation', 'user/activation');
})->middleware('verify')->ext('html');

//推荐关系
Route::group('relation', function () {
    Route::get('/index', 'relation/index');
    Route::get('/algebra', 'relation/algebra');
    Route::get('/getData', 'relation/getData');
})->middleware('verify');

//财务管理
Route::group('account', function () {
    Route::get('/index', 'account/index');
    Route::get('/recharge', 'account/recharge');
    Route::get('/bonus', 'account/bonus');
    Route::get('/add', 'account/add');
    Route::get('/edit', 'account/edit');
    Route::get('/export', 'account/export');
    Route::get('/getList', 'account/getList');
})->middleware('verify');

//充值管理
Route::group('remit', function () {
    Route::get('/index', 'remit/index');
    Route::get('/add', 'remit/add');
    Route::get('/edit', 'remit/edit');
    Route::get('/export', 'remit/export');
    Route::get('/getList', 'remit/getList');
    Route::post('/save', 'remit/save');
    Route::post('/batch', 'remit/batch');
})->middleware('verify');

//提现管理
Route::group('draw', function () {
    Route::get('/index', 'draw/index');
    Route::get('/add', 'draw/add');
    Route::get('/edit', 'draw/edit');
    Route::get('/export', 'draw/export');
    Route::get('/getList', 'draw/getList');
    Route::post('/save', 'draw/save');
    Route::post('/batch', 'draw/batch');
})->middleware('verify');

//机构信息
Route::group('mechanism', function () {
    Route::get('/index', 'mechanism/index');
    Route::get('/add', 'mechanism/add');
    Route::get('/edit', 'mechanism/edit');
    Route::get('/export', 'mechanism/export');
    Route::get('/getList', 'mechanism/getList');
    Route::post('/save', 'mechanism/save');
    Route::post('/batch', 'mechanism/batch');
})->middleware('verify');

//企业信息
Route::group('enterprise', function () {
    Route::get('/index', 'enterprise/index');
    Route::get('/add', 'enterprise/add');
    Route::get('/edit', 'enterprise/edit');
    Route::get('/export', 'enterprise/export');
    Route::get('/getList', 'enterprise/getList');
    Route::post('/save', 'enterprise/save');
    Route::post('/batch', 'enterprise/batch');
})->middleware('verify');

//升级激活管理
Route::group('upgrade', function () {
    Route::get('/index', 'upgrade/index');
    Route::get('/add', 'upgrade/add');
    Route::get('/edit', 'upgrade/edit');
    Route::get('/export', 'upgrade/export');
    Route::get('/getList', 'upgrade/getList');
    Route::post('/save', 'upgrade/save');
    Route::post('/batch', 'upgrade/batch');
})->middleware('verify');

//转账管理
Route::group('transfer', function () {
    Route::get('/index', 'transfer/index');
    Route::get('/export', 'remit/export');
    Route::get('/getList', 'transfer/getList');
})->middleware('verify');

//转换管理
Route::group('exchange', function () {
    Route::get('/index', 'exchange/index');
    Route::get('/export', 'exchange/export');
    Route::get('/getList', 'exchange/getList');
})->middleware('verify');

//奖金管理
Route::group('summaryUser', function () {
    Route::get('/index', 'summaryUser/index');
    Route::get('/getList', 'summaryUser/getList');
    Route::get('/export', 'summaryUser/export');
    Route::get('/summary_info', 'summaryUser/summary_info');
})->middleware('verify');

//奖金管理
Route::group('summaryDate', function () {
    Route::get('/index', 'summaryDate/index');
    Route::get('/getList', 'summaryDate/getList');
    Route::get('/export', 'summaryDate/export');
    Route::get('/summary_info', 'summaryDate/summary_info');
})->middleware('verify');

//释放订单管理
Route::group('release', function () {
    Route::get('/index', 'release/index');
    Route::get('/getList', 'release/getList');
    Route::get('/export', 'release/export');
    Route::get('/summary_info', 'release/summary_info');
})->middleware('verify');

//业绩订单管理
Route::group('activation', function () {
    Route::get('/index', 'activation/index');
    Route::get('/getList', 'activation/getList');
    Route::get('/export', 'activation/export');
    Route::get('/summary_info', 'activation/summary_info');
})->middleware('verify');

//新闻公告
Route::group('news', function () {
    Route::get('/index', 'news/index');
    Route::get('/getList', 'news/getList');
    Route::get('/add', 'news/add');
    Route::get('/edit', 'news/edit');
    Route::get('/export', 'news/export');
    Route::post('/save', 'news/save');
    Route::post('/update', 'news/update');
    Route::post('/delete', 'news/delete');
})->middleware('verify');

//维修类型
Route::group('maintain', function () {
    Route::get('/index', 'maintain/index');
    Route::get('/getList', 'maintain/getList');
    Route::get('/add', 'maintain/add');
    Route::get('/edit', 'maintain/edit');
    Route::get('/export', 'maintain/export');
    Route::post('/save', 'maintain/save');
    Route::post('/update', 'maintain/update');
    Route::post('/delete', 'maintain/delete');
})->middleware('verify');

//优惠券
Route::group('coupon', function () {
    Route::get('/index', 'coupon/index');
    Route::get('/getList', 'coupon/getList');
    Route::get('/add', 'coupon/add');
    Route::get('/edit', 'coupon/edit');
    Route::get('/export', 'coupon/export');
    Route::post('/save', 'coupon/save');
    Route::post('/update', 'coupon/update');
    Route::post('/delete', 'coupon/delete');
})->middleware('verify');

//预约留言
Route::group('reservation', function () {
    Route::get('/index', 'reservation/index');
    Route::get('/getList', 'reservation/getList');
    Route::get('/add', 'reservation/add');
    Route::get('/edit', 'reservation/edit');
    Route::get('/export', 'reservation/export');
    Route::post('/save', 'reservation/save');
    Route::post('/update', 'reservation/update');
    Route::post('/delete', 'reservation/delete');
})->middleware('verify');

//案例展示
Route::group('documentation', function () {
    Route::get('/index', 'documentation/index');
    Route::get('/getList', 'documentation/getList');
    Route::get('/add', 'documentation/add');
    Route::get('/edit', 'documentation/edit');
    Route::get('/export', 'documentation/export');
    Route::post('/save', 'documentation/save');
    Route::post('/update', 'documentation/update');
    Route::post('/delete', 'documentation/delete');
})->middleware('verify');

//合作单位
Route::group('cooperative', function () {
    Route::get('/index', 'cooperative/index');
    Route::get('/getList', 'cooperative/getList');
    Route::get('/add', 'cooperative/add');
    Route::get('/edit', 'cooperative/edit');
    Route::get('/export', 'cooperative/export');
    Route::post('/save', 'cooperative/save');
    Route::post('/update', 'cooperative/update');
    Route::post('/delete', 'cooperative/delete');
})->middleware('verify');

//师傅展示
Route::group('worker', function () {
    Route::get('/index', 'worker/index');
    Route::get('/getList', 'worker/getList');
    Route::get('/add', 'worker/add');
    Route::get('/edit', 'worker/edit');
    Route::get('/export', 'worker/export');
    Route::post('/save', 'worker/save');
    Route::post('/update', 'worker/update');
    Route::post('/delete', 'worker/delete');
})->middleware('verify');

//会员职称
Route::group('capacity', function () {
    Route::get('/index', 'capacity/index');
    Route::get('/getList', 'capacity/getList');
    Route::get('/add', 'capacity/add');
    Route::get('/edit', 'capacity/edit');
    Route::get('/export', 'capacity/export');
    Route::post('/save', 'capacity/save');
    Route::post('/update', 'capacity/update');
    Route::post('/delete', 'capacity/delete');
})->middleware('verify');

//用户等级
Route::group('level', function () {
    Route::get('/index', 'level/index');
    Route::get('/getList', 'level/getList');
    Route::get('/add', 'level/add');
    Route::get('/edit', 'level/edit');
    Route::get('/export', 'level/export');
    Route::post('/save', 'level/save');
    Route::post('/update', 'level/update');
    Route::post('/delete', 'level/delete');
})->middleware('verify');


Route::group('teamLevel', function () {
    Route::get('/index', 'teamLevel/index');
    Route::get('/getList', 'teamLevel/getList');
    Route::get('/add', 'teamLevel/add');
    Route::get('/edit', 'teamLevel/edit');
    Route::get('/export', 'teamLevel/export');
    Route::post('/save', 'teamLevel/save');
    Route::post('/update', 'teamLevel/update');
    Route::post('/delete', 'teamLevel/delete');
})->middleware('verify');


//推荐奖
Route::group('recommend', function () {
    Route::get('/index', 'recommend/index');
    Route::get('/getList', 'recommend/getList');
    Route::get('/add', 'recommend/add');
    Route::get('/edit', 'recommend/edit');
    Route::get('/export', 'recommend/export');
    Route::post('/save', 'recommend/save');
    Route::post('/update', 'recommend/update');
    Route::post('/delete', 'recommend/delete');
})->middleware('verify');

//轮播管理
Route::group('carousel', function () {
    Route::get('/index', 'carousel/index');
    Route::get('/getList', 'carousel/getList');
    Route::get('/add', 'carousel/add');
    Route::get('/edit', 'carousel/edit');
    Route::post('/save', 'carousel/save');
    Route::post('/update', 'carousel/update');
    Route::post('/delete', 'carousel/delete');
})->middleware('verify');


//留言管理
Route::group('message', function () {
    Route::get('/index', 'message/index');
    Route::get('/enterprise', 'message/enterprise');
    Route::get('/getList', 'message/getList');
    Route::get('/add', 'message/add');
    Route::get('/edit', 'message/edit');
    Route::post('/save', 'message/save');
})->middleware('verify');

//答疑
Route::group('answer', function () {
    Route::get('/index', 'answer/index');
    Route::get('/enterprise', 'answer/enterprise');
    Route::get('/getList', 'answer/getList');
    Route::get('/add', 'answer/add');
    Route::get('/edit', 'answer/edit');
    Route::post('/save', 'answer/save');
})->middleware('verify');

//消息管理
Route::group('notice', function () {
    Route::get('/group', 'notice/group');
    Route::get('/getData', 'notice/getData');
    Route::get('/show_order', 'notice/show_order');
    Route::get('/show_user', 'notice/show_user');
    Route::get('/show_message', 'notice/show_message');
    Route::get('/all_read', 'notice/all_read');
    Route::get('/noticeCount', 'notice/noticeCount');
})->middleware('verify');

//商品分类
Route::group('productCate', function () {
    Route::get('/index', 'productCate/index');
    Route::get('/add', 'productCate/add');
    Route::get('/edit', 'productCate/edit');
    Route::get('/getCate', 'productCate/getCate');
    Route::post('/save', 'productCate/save');
    Route::post('/update', 'productCate/update');
    Route::post('/delete', 'productCate/delete');
})->middleware('verify');

//课程分类
Route::group('curriculumCate', function () {
    Route::get('/index', 'curriculumCate/index');
    Route::get('/add', 'curriculumCate/add');
    Route::get('/edit', 'curriculumCate/edit');
    Route::get('/getCate', 'curriculumCate/getCate');
    Route::post('/save', 'curriculumCate/save');
    Route::post('/update', 'curriculumCate/update');
    Route::post('/delete', 'curriculumCate/delete');
})->middleware('verify');


//商品列表
Route::group('product', function () {
    Route::get('/index', 'product/index');
    Route::get('/follow', 'product/follow');
    Route::get('/getList', 'product/getList');
    Route::get('/add', 'product/add');
    Route::get('/edit', 'product/edit');
    Route::get('/getCity', 'product/getCity');
    Route::post('/save', 'product/save');
    Route::post('/update', 'product/update');
    Route::post('/delete', 'product/delete');
})->middleware('verify');

//活动管理
Route::group('activity', function () {
    Route::get('/index', 'activity/index');
    Route::get('/follow', 'activity/follow');
    Route::get('/getList', 'activity/getList');
    Route::get('/add', 'activity/add');
    Route::get('/edit', 'activity/edit');
    Route::post('/save', 'activity/save');
    Route::post('/update', 'activity/update');
    Route::post('/delete', 'activity/delete');
})->middleware('verify');

//活动反馈管理
Route::group('activityPhoto', function () {
    Route::get('/index', 'activityPhoto/index');
    Route::get('/follow', 'activityPhoto/follow');
    Route::get('/getList', 'activityPhoto/getList');
    Route::get('/add', 'activityPhoto/add');
    Route::get('/edit', 'activityPhoto/edit');
    Route::post('/save', 'activityPhoto/save');
    Route::post('/update', 'activityPhoto/update');
    Route::post('/delete', 'activityPhoto/delete');
})->middleware('verify');

//课程管理
Route::group('curriculum', function () {
    Route::get('/index', 'curriculum/index');
    Route::get('/follow', 'curriculum/follow');
    Route::get('/getList', 'curriculum/getList');
    Route::get('/add', 'curriculum/add');
    Route::get('/edit', 'curriculum/edit');
    Route::post('/save', 'curriculum/save');
    Route::post('/update', 'curriculum/update');
    Route::post('/delete', 'curriculum/delete');
})->middleware('verify');

//课程章管理
Route::group('chapter', function () {
    Route::get('/index', 'chapter/index');
    Route::get('/follow', 'chapter/follow');
    Route::get('/getList', 'chapter/getList');
    Route::get('/add', 'chapter/add');
    Route::get('/edit', 'chapter/edit');
    Route::post('/save', 'chapter/save');
    Route::post('/update', 'chapter/update');
    Route::post('/delete', 'chapter/delete');
})->middleware('verify');

//课程节管理
Route::group('section', function () {
    Route::get('/index', 'section/index');
    Route::get('/follow', 'section/follow');
    Route::get('/getList', 'section/getList');
    Route::get('/add', 'section/add');
    Route::get('/edit', 'section/edit');
    Route::post('/save', 'section/save');
    Route::post('/update', 'section/update');
    Route::post('/delete', 'section/delete');
})->middleware('verify');

//热门城市
Route::group('hotCities', function () {
    Route::get('/index', 'hotCities/index');
    Route::get('/getList', 'hotCities/getList');
    Route::get('/add', 'hotCities/add');
    Route::get('/edit', 'hotCities/edit');
    Route::post('/save', 'hotCities/save');
    Route::post('/update', 'hotCities/update');
    Route::post('/delete', 'hotCities/delete');
})->middleware('verify');

Route::group('quickCities', function () {
    Route::get('/index', 'quickCities/index');
    Route::get('/getList', 'quickCities/getList');
    Route::get('/add', 'quickCities/add');
    Route::get('/edit', 'quickCities/edit');
    Route::post('/save', 'quickCities/save');
    Route::post('/update', 'quickCities/update');
    Route::post('/delete', 'quickCities/delete');
})->middleware('verify');


Route::group('areaCensus', function () {
    Route::get('/index', 'areaCensus/index');
    Route::get('/getList', 'areaCensus/getList');
    Route::get('/add', 'areaCensus/add');
    Route::get('/edit', 'areaCensus/edit');
    Route::post('/save', 'areaCensus/save');
    Route::post('/update', 'areaCensus/update');
    Route::post('/delete', 'areaCensus/delete');
})->middleware('verify');

Route::group('cateCensus', function () {
    Route::get('/index', 'cateCensus/index');
    Route::get('/getList', 'cateCensus/getList');
    Route::get('/add', 'cateCensus/add');
    Route::get('/edit', 'cateCensus/edit');
    Route::post('/save', 'cateCensus/save');
    Route::post('/update', 'cateCensus/update');
    Route::post('/delete', 'cateCensus/delete');
})->middleware('verify');


//订单管理
Route::group('order', function () {
    Route::get('/index', 'order/index');
    Route::get('/drawbacks', 'order/drawbacks');
    Route::get('/success', 'order/success');
    Route::get('/getList', 'order/getList');
    Route::get('/add', 'order/add');
    Route::get('/edit', 'order/edit');
    Route::get('/export', 'order/export');
    Route::get('/getArea', 'order/getArea');
    Route::post('/save', 'order/save');
    Route::post('/update', 'order/update');
    Route::post('/delete', 'order/delete');
    Route::rule('/deliver', 'order/deliver');
    Route::rule('/drawback', 'order/drawback');
})->middleware('verify');


//活动订单管理
Route::group('activityOrder', function () {
    Route::get('/index', 'activityOrder/index');
    Route::get('/drawbacks', 'activityOrder/drawbacks');
    Route::get('/success', 'activityOrder/success');
    Route::get('/getList', 'activityOrder/getList');
    Route::get('/add', 'activityOrder/add');
    Route::get('/edit', 'activityOrder/edit');
    Route::get('/export', 'activityOrder/export');
    Route::get('/getArea', 'activityOrder/getArea');
    Route::post('/save', 'activityOrder/save');
    Route::post('/update', 'activityOrder/update');
    Route::post('/delete', 'activityOrder/delete');
    Route::rule('/deliver', 'activityOrder/deliver');
    Route::rule('/drawback', 'activityOrder/drawback');
})->middleware('verify');


//活动订单管理
Route::group('curriculumOrder', function () {
    Route::get('/index', 'curriculumOrder/index');
    Route::get('/drawbacks', 'curriculumOrder/drawbacks');
    Route::get('/success', 'curriculumOrder/success');
    Route::get('/getList', 'curriculumOrder/getList');
    Route::get('/add', 'curriculumOrder/add');
    Route::get('/edit', 'curriculumOrder/edit');
    Route::get('/export', 'curriculumOrder/export');
    Route::get('/getArea', 'curriculumOrder/getArea');
    Route::post('/save', 'curriculumOrder/save');
    Route::post('/update', 'curriculumOrder/update');
    Route::post('/delete', 'curriculumOrder/delete');
    Route::rule('/deliver', 'curriculumOrder/deliver');
    Route::rule('/drawback', 'curriculumOrder/drawback');
})->middleware('verify');


//菜单管理
Route::group('menu', function () {
    Route::get('/index', 'menu/index');
    Route::get('/getList', 'menu/getList');
    Route::get('/add', 'menu/add');
    Route::get('/edit', 'menu/edit');
    Route::post('/save1', 'menu/save1');
    Route::get('/updateStatus', 'menu/updateStatus');
    Route::post('/delete', 'menu/delete');
})->middleware('verify');

//快递管理
Route::group('express', function () {
    Route::get('/index', 'express/index');
    Route::get('/getList', 'express/getList');
    Route::get('/add', 'express/add');
    Route::get('/edit', 'express/edit');
    Route::post('/save', 'express/save');
    Route::post('/update', 'express/update');
    Route::post('/delete', 'express/delete');
})->middleware('verify');

//网站配置
Route::group('config', function () {
    Route::get('/index', 'config/index');
    Route::get('/getList', 'config/getList');
    Route::get('/add', 'config/add');
    Route::get('/edit', 'config/edit');
    Route::post('/save', 'config/save');
    Route::post('/update', 'config/update');
    Route::post('/delete', 'config/delete');
    Route::get('/create', 'config/create');
    Route::post('/saveGroup', 'config/saveGroup');
})->middleware('verify');

//角色管理
Route::group('role', function () {
    Route::get('/index', 'role/index');
    Route::get('/getList', 'role/getList');
    Route::get('/add', 'role/add');
    Route::get('/edit', 'role/edit');
    Route::post('/save', 'role/save');
    Route::post('/update', 'role/update');
    Route::post('/delete', 'role/delete');
    Route::rule('/give', 'role/give');
})->middleware('verify');

//用户列表
Route::group('admin', function () {
    Route::get('/index', 'admin/index');
    Route::get('/getList', 'admin/getList');
    Route::get('/add', 'admin/add');
    Route::get('/edit', 'admin/edit');
    Route::post('/save', 'admin/save');
    Route::post('/update', 'admin/update');
    Route::post('/delete', 'admin/delete');
    Route::rule('/password', 'admin/password');
})->middleware('verify');


//数据管理
Route::group('backup', function () {
    Route::get('/index', 'backup/index');
    Route::get('/add', 'backup/add');
    Route::get('/import', 'backup/import');
    Route::get('/clear', 'backup/clear');
    Route::get('/backup', 'backup/delete');
})->middleware('verify');

//操作日志
Route::group('logs', function () {
    Route::get('/index', 'logs/index');
    Route::get('/getList', 'logs/getList');
    Route::get('/queryIp', 'logs/queryIp');
})->middleware('verify');

//素材管理
Route::group('materialLibrary', function () {
    Route::get('/index', 'materialLibrary/index');
    Route::get('/open', 'materialLibrary/open');
    Route::post('/addGroup', 'materialLibrary/addGroup');
    Route::post('/destroy', 'materialLibrary/destroy');
    Route::post('/destroyGroup', 'materialLibrary/destroyGroup');
    Route::post('/saveGroup', 'materialLibrary/saveGroup');
})->ext('html');

//定时测试
Route::group('test', function () {
    Route::get('/index', 'test/index');
    Route::post('/execute', 'test/execute');
})->middleware('verify')->ext('html');
